'- sdlBrt palette01_converterfromhexcolours.sdlbas > palette01.zxi
dim c[32]

'http://www.colourlovers.com/palette/410644/Intelligence
c[00]=0x303745
c[01]=0x2FD4B0
c[02]=0xD4BE2F
c[03]=0xE9F7CB

'http://www.colourlovers.com/palette/2549771/Arbre_vert
c[04]=0x005E46
c[05]=0x00713D
c[06]=0x89C541
c[07]=0xCEDD2A

'http://www.colourlovers.com/palette/233850/Megalo_no15
c[08]=0xF00000
c[09]=0xF07800
c[10]=0xF0A800
c[11]=0x90C030

'http://www.colourlovers.com/palette/1707607/naya_heather
c[12]=0x5A434D
c[13]=0xFE4F3E
c[14]=0xFBAF26
c[15]=0xFAC14E


c[16]=0x000000
c[17]=0x000000
c[18]=0x000000
c[19]=0x000000
c[20]=0x000000
c[21]=0x000000
c[22]=0x000000
c[23]=0x000000
c[24]=0x000000
c[25]=0x000000
c[26]=0x000000
c[27]=0x000000
c[28]=0x000000
c[29]=0x000000
c[30]=0x000000
c[31]=0x000000


print"palette01:"
print"'----- bbgggrrr"
print"asm"

for i=0 to 31
  t=c[i]
  b=bitwiseand(t,192)/64:t=int(t/256)
  g=bitwiseand(t,224)/32:t=int(t/256)
  r=bitwiseand(t,224)/32
  f=(b*64)+(g*8)+r
  o$=right$("00000000"+bin$(f),8)
  print "  defb "+o$+"b ;- #"+ucase$(right$("000000"+hex$(c[i]),6))
  next

print"  end asm"



